package cn.ghx.xboot.stat;

import cn.ghx.xboot.common.Result;
import cn.ghx.xboot.stat.dto.StatTotalDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/stat")
public class StatController {
    public static final String GET_TOTAL = "/total";

    @Autowired
    private StatService service;

    @GetMapping(GET_TOTAL)
    public Result<StatTotalDto> getStatTotal(){
        return Result.success(service.getStatTotal());
    }
}
